browser.runtime.sendMessage("import").then((response) => {
    if (!response){
        return
    }
    if (!response.text || response.text.length == 0){
        alert("当前无值，需要先点击导出")
        return
    }
    if (!response.text.startsWith("{")){
        alert("格式错误，需要以{为开头")
        return
    }

    var dic = JSON.parse(response.text);
    Object.keys(dic).forEach(k => {
        sessionStorage.setItem(k,dic[k]);
    });
    alert("导入成功")
    window.location = "https://lzpt.hnzx.gov.cn/henan-platform/#/workbench"
});
